<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>数组定义方式</title>
  <script type="text/javascript">
    //奥迪 宝马 问界
    var cars = ['奥迪', '宝马', '奔驰'];

    //第二种方式
    var cars2 = [];
    cars2[0] = '奥迪';
    cars2[1] = '宝马';
    cars2[2] = '奔驰';

    //第三种方式
    var cars3 = new Array('奥迪', '宝马', '奔驰');

  </script>
</head>
<body>

</body>
</html>
